--- import { type CollectionEntry, getCollection } from "astro:content"; import Comments from "../../components/Comments.astro"; import Layout from "../../layouts/PageLayout.astro"; import Pagination from "../../components/PostPagination.astro"; export async function getStaticPaths() { const posts = await getCollection("blog"); const total = posts.length; return posts.map((post, index) => ({ params: { slug: post.slug }, props: { post, prevPost: index + 1 === total ? null : posts[index + 1], nextPost: index === 0 ? null : posts[index - 1], }, })); } type Props = CollectionEntry<"blog">; const { post, prevPost, nextPost } = Astro.props; const { Content, remarkPluginFrontmatter } = await post.render(); ---

{post.data.title}

Posted  by {post.data.author} ‐ {remarkPluginFrontmatter.minutesRead}